﻿using Abp.Application.Services.Dto;
using ARchGL.Platform.Dtos;
using System;
using System.Collections.Generic;
using System.Text;

namespace ARchGL.Platform.Dtos
{
    /// <summary>
    /// 二维图纸
    /// </summary>
    public class DrawingsDto : EntityDto<Guid>
    {
        /// <summary>
        /// 图纸所属模型Id
        /// </summary>
        public Guid ModelId { get; set; }
        /// <summary>
        /// 所属项目Id
        /// </summary>
        public Guid ProjectId { get; set; }
        /// <summary>
        /// 文件Id（来自文件系统）
        /// </summary>
        public Guid FileId { get; set; }
        /// <summary>
        /// 大小（存储单位为 B）
        /// </summary>
        public int Size { get; set; }
        /// <summary>
        /// 文件名
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 链接地址
        /// </summary>
        public string Url { get; set; }
        /// <summary>
        /// 用户名称
        /// </summary>
        public string CreatorUserName { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreationTime { get; set; }
        /// <summary>
        /// 创建时间戳
        /// </summary>
        public long CreationUniversalTime { get { return CreationTime.ToUnixTimestamp(); } }
    }

    public class FileBaseDto : EntityDto<Guid>
    {
        /// <summary>
        /// 所属项目Id
        /// </summary>
        public Guid ProjectId { get; set; }
        /// <summary>
        /// 文件Id（来自文件系统）
        /// </summary>
        public Guid FileId { get; set; }
        /// <summary>
        /// 文件名
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 链接地址
        /// </summary>
        public string Url { get; set; }
    }
}
